package top.leyi.main;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import top.leyi.utils.ApplicationStartup;

@SpringBootApplication
@ComponentScan(basePackages = {  "top.leyi.ServiceImpl","top.leyi.exception","top.leyi.config","top.leyi.dao"
                                ,"top.leyi.entity","top.leyi.factory","top.leyi.interceptor","top.leyi.RunnableImpl"
                                ,"top.leyi.utils","top.leyi.handle","top.leyi.aop"})

@MapperScan("top.leyi.mapper")
@EnableSwagger2

public class ApiApplication {

    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(ApiApplication.class);
        springApplication.addListeners(new ApplicationStartup());
        springApplication.run(args);
      }

}
